
if exists(select name from sysobjects where name = 'sp_LoaiSanPhamGetTypeHien')
	drop proc sp_LoaiSanPhamGetTypeHien
go
/*
	Created by: Phuoc NH
	Created on: 22/01/2013 (dd/mm/yyyy)
	Description: lay danh muc san pham hien danh muc, hien trang chu....
	--
	File:$sql-scripts/Proc.sp_LoaiSanPhamGetTypeHien.sql
*/

create proc sp_LoaiSanPhamGetTypeHien
@Type Nvarchar(1000)
as
begin
	declare @string Nvarchar(1000)
	set @string=N'select Loai_san_pham_id, Ten_loai_san_pham from tbl_loai_san_pham where status=1 and '+@Type
	exec sp_executesql  @string
end
go